#include "rendercontext.h"
#include "ieffect.h"

namespace gecko
{

void RenderContext::Begin()
{
	m_Effect->SetupFromRenderContext(*this);
	m_Effect->Commit();
	m_Effect->Begin();
}

void RenderContext::End()
{
	m_Effect->End();
}

unsigned int RenderContext::GetNumPasses()
{
	return m_Effect->GetNumPasses();
}

void RenderContext::BeginPass(unsigned int pass)
{
	m_Effect->BeginPass(pass);
}

void RenderContext::EndPass()
{
	m_Effect->EndPass();
}

void RenderContext::SetEffect( IEffect* effect )
{
	m_Effect = effect;
}

void RenderContext::SetViewProjectionMatrix( const Matrix44& matrix )
{
	ViewProjectionMatrix = matrix;
}

const Matrix44& RenderContext::GetViewProjectionMatrix() const
{
	return ViewProjectionMatrix;
}

}// namespace gecko

